package com.ryskoo.catering.productmain.repository;

import com.ryskoo.catering.productmain.domain.ProductMainPO;
import com.ryskoo.framework.core.bean.QueryMessageDTO;
import com.ryskoo.framework.core.repository.IBasicRepository;

import java.util.List;

public interface IProductMainRepository extends IBasicRepository<ProductMainPO> {
    /**
     * 菜品批量/单个上架
     * @param idList
     */
    void onShelves(List<String> idList);

    /**
     * 菜品批量/单个下架
     * @param idList
     */
    void offShelves(List<String> idList);

    /**
     * 菜品批量/单个售罄
     * @param idList
     */
    void sellOut(List<String> idList);

    /**
     * 菜品批量/单个补货
     * @param idList
     */
    void supply(List<String> idList);

    /**
     * 根据分类uuid查询商品uuid集合
     * @param categoryUuid
     * @return
     */
    List<String> getUuidsByCategoryId(String categoryUuid);

    void syncToElastic(List<ProductMainPO> list);

    List<ProductMainPO> getProductInfoFromES(QueryMessageDTO qm, boolean byPage);

    int getCountFromES(QueryMessageDTO qm);

    void deleteProductFromES(List<String> idList);
}
